<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <div id="app">
        <ul>
            <li v-for="item,i in tvs" :key="i">{{item}}</li>
        </ul>

        <button @click="fn">修改第三个内容</button>
        <button @click="add">添加内容</button>
    </div>
    <script src="vue.js"></script>
    <script>
        var app = new Vue({
                el: '#app',
                data: {
                    tvs: ["风起洛阳","谁是凶手","雪中汉刀"]
                },
                mounted(){
                    console.log(this)
                },
                methods:{
                    fn(){
                        this.tvs.splice(2,1,"花千骨")
                    },
                    add(){
                        this.tvs.unshift("外科风云")
                    }
                }
            })
    </script>
</body>
</html>